package com.codinghero.example.longleg;

import java.io.File;
import java.util.Comparator;

public class FileModifyTimeComparator implements Comparator<File> {

	public int compare(File o1, File o2) {
		long t1 = o1.lastModified();
		long t2 = o2.lastModified();
		if (t1 > t2)
			return 1;
		else if (t1 < t2)
			return -1;
		else
			return 0;
	}

}
